<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>formJs demo2 | no any Ajax lib</title> 
	<script type="text/javascript" src="http://localhost:3000/formJS.es6.js"></script>
</head>
<body>
	<form id="demoForm" action="http://localhost:3000/data" method="get">
		First name: 
		<input type="text" name="firstname" value="A" /> <br />
		Last name: 
		<input type="text" name="lastname" value="B" /> <br />
		<input id="submitButton" type="submit" value="提交"/>
	</form>
</body>
<script type="text/javascript">
	var formObj = new FormJs({
		formId : "demoForm",
		isRefresh : true,
		async : false,
		subButId : "submitButton", 
	    	onclick : function() {
		  	alert();
		},
		callback : function(state,data,errorinfo){ 
			if ( state == "success" ){
				console.log(data);
			}
		}
	});
</script>
</html>